<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <title>爱宠医院管理系统</title>
	<meta http-equiv="pragma" content="no-cache"/>
	<meta http-equiv="cache-control" content="no-cache"/>
	<meta http-equiv="expires" content="0"/>    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
	<meta http-equiv="description" content="This is my page"/>
	<link href="css/Common.css" rel="stylesheet" type="text/css" />
    <link href="css/sitegeneric08.css" rel="stylesheet" type="text/css" />
  </head>
  
<body>
<!-- head如果图片高度不合适。请修改Common.ces里面的".Header .HeaderTop"的高度。和".Header"的高度-->
<jsp:include flush="true" page="incTop.jsp"></jsp:include>    
<!-- head-->	
	
	
<!--body-->
<div align="center" class="Wrapper">
<div id="MainCenter" align="center" class="MainCenter">
	     <div id="navigation" class="naivgation">
				<jsp:include flush="true" page="incLeft.jsp"></jsp:include>
		 </div>
	<div id="content" class="Sub">
				<div class="NewContainer770">
					<div class="BoxHeader">
						<div class="BoxHeader-center MarginTop10">销售排行榜</div>
					</div>
					<div class="Slot">
						<table cellspacing="1" width="100%">
					          <tr>
					                  <td align="center" style="width: 135px;">
					                     <a href="#"/>
					                     <img width="135" height="130" style="border:1px solid #ccc; padding:3px;" src="./img/pro01.jpg"/>
					                     <br/>
					                     	豆腐猫砂
					                     <br/>
					                        	￥：200.00
					                  </td>
					                  <td align="center" style="width: 135px;">
					                     <a href="#"/>
					                     <img width="135" height="130" style="border:1px solid #ccc; padding:3px;" src="./img/pro02.jpg"/>
					                     <br/>
					                     	明星同款
					                     <br/>
					                        	￥：1999.00
					                  </td>
					                  <td align="center" style="width: 135px;">
					                     <a href="#"/>
					                     <img width="135" height="130" style="border:1px solid #ccc; padding:3px;" src="./img/pro03.jpg"/>
					                     <br/>
					                     	美思成犬粮
					                     <br/>
					                        	￥：300.00
					                  </td>
					          </tr>
				        </table>
                    </div>
				</div>
		 </div>
		 <div class="NewContainer770">
				<div class="BoxHeader">
				    <div class="BoxHeader-center MarginTop10">
						<span style="float:left">医生列表</span>
						<span style="float:right"><a href="./staff.jsp">更多>></a>&nbsp;&nbsp;&nbsp;&nbsp;</span>
			        </div>
				</div>
				<div class="Slot">
				    <table cellspacing="3" cellpadding="3" align="left" id="contentdoc">
<%--				           <tr>--%>
<%--			                  <td align="center" style="width:135px;">--%>
<%--								   <a href="qiantai/goods/goodsDetail.jsp">--%>
<%--								      <img width="135" height="130" src="" style="border:1px solid #ccc; padding:3px;"/>--%>
<%--								   </a>--%>
<%--								   <input type="checkbox" name="goodsId" value=""/>--%>
<%--			                       	商品名(￥:100元)--%>
<%--			                  </td>--%>

<%--				          </tr>--%>
					</table>
                </div>
		 </div>
</div>
</div>
<!--body-->
	
	
	
<!--foot -->	
<div align="center" class="Wrapper">
	<div style="height: 40px;" align="center" class="Footer">
		<ul style="margin-top: 13px;">
			<li>
				<a>网站声明</a>&nbsp;&nbsp; |&nbsp;&nbsp;
				<a>服务网点</a>&nbsp;&nbsp; |&nbsp;
				<a>网站地图</a>&nbsp; |&nbsp;&nbsp;
				<a>联系我们</a>&nbsp;&nbsp; |&nbsp;&nbsp;
				<a>客服热线：800-820-8820</a>
			</li>
		</ul>
	</div>
</div>

<!--foot -->	

<script type="text/javascript">

$(function(){
	loadData(1);
});


var number = 10;//查询的数量
var linenum = 5;//每行的数量
var flag = true;
var loadData = function(page){
	var obj = {};
	obj.page = page;
	obj.number = number;
	$.get("../api/staff/list",obj,function(data){
		if (data.code==0) {
			var arr = data.data;
			var html = '';
			for (var i=0,len=arr.length;i<len;i++) {
				var obj = arr[i];
				console.log(obj);
				if (i % linenum == 0) {
					html += '<tr>';
				} 
				
				html += '<td align="center">'
					   +'<a href= "staff_detail.jsp?'+$.param(obj)+'">'  
					   +'<img width="135" height="130" src="'+'../'+obj.photo+'" style="border:1px solid #ccc; padding:3px;"/>'
					   +'</a>'
					   +'<div>'+obj.name+'</div>'
        			   +'</td>';
        	
				if ((i+1) % linenum == 0) {
					html += '</tr>';
				}

			}
			// console.log(document.getElementById('contentdoc'))
			document.getElementById('contentdoc').innerHTML = html;
			// document.querySelector('#content_body').innerHTML = html;

		}
	});
}

</script>

</body>
</html>
